package com.google.gwt.gwtpages.client.page;

public interface AsyncPageCallback {

	/**
	 * Event called when the page load is complete and successful
	 */
	void onSuccess();

	/**
	 * This is a way to send a command to all
	 * {@link PageEventHandler#onPageWaitForAsync(LoadedPageContainer, com.google.gwt.gwtpages.client.page.parameters.PageParameters, com.google.gwt.gwtpages.client.GotoPageCommand)}
	 */
	void waitForAsync();

	/**
	 * Event called if an error occurs while loading the page
	 * 
	 * @param cause
	 *            the thrown exception
	 */
	void onFailure(Throwable cause);
}
